﻿using System;
using ProtoBuf;

namespace Core
{
    public interface IMessage : IEventData
    {

    }

    public interface IPushMessage : IMessage
    {

    }

    public interface IRequestMessage : IMessage
    {

    }

    public interface IResponseMessage : IMessage
    {
        ushort error { get; set; }
    }

    public class MessageDataAttribute : Attribute
    {
        public ushort messageID;
        public MessageDataAttribute(ushort messageID)
        {
            this.messageID = messageID;
        }
    }

    [ProtoContract]
    public class IIKV
    {
        [ProtoMember(1)]
        public int key;
        [ProtoMember(2)]
        public int value;
    }

    [ProtoContract]
    public class SSKV
    {
        [ProtoMember(1)]
        public string key;
        [ProtoMember(2)]
        public string value;
    }

    [ProtoContract]
    public class ISKV
    {
        [ProtoMember(1)]
        public int key;
        [ProtoMember(2)]
        public string value;
    }

    [ProtoContract]
    public class SIKV
    {
        [ProtoMember(1)]
        public string key;
        [ProtoMember(2)]
        public int value;
    }
}
